package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.WorkerMapper;
import com.ruoyi.system.domain.Worker;
import com.ruoyi.system.service.IWorkerService;
import com.ruoyi.common.core.text.Convert;

/**
 * 员工信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-05-04
 */
@Service
public class WorkerServiceImpl implements IWorkerService 
{
    @Autowired
    private WorkerMapper workerMapper;

    /**
     * 查询员工信息
     * 
     * @param workerId 员工信息ID
     * @return 员工信息
     */
    @Override
    public Worker selectWorkerById(Long workerId)
    {
        return workerMapper.selectWorkerById(workerId);
    }

    /**
     * 查询员工信息列表
     * 
     * @param worker 员工信息
     * @return 员工信息
     */
    @Override
    public List<Worker> selectWorkerList(Worker worker)
    {
        return workerMapper.selectWorkerList(worker);
    }

    /**
     * 新增员工信息
     * 
     * @param worker 员工信息
     * @return 结果
     */
    @Override
    public int insertWorker(Worker worker)
    {
        return workerMapper.insertWorker(worker);
    }

    /**
     * 修改员工信息
     * 
     * @param worker 员工信息
     * @return 结果
     */
    @Override
    public int updateWorker(Worker worker)
    {
        return workerMapper.updateWorker(worker);
    }

    /**
     * 删除员工信息对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteWorkerByIds(String ids)
    {
        return workerMapper.deleteWorkerByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除员工信息信息
     * 
     * @param workerId 员工信息ID
     * @return 结果
     */
    @Override
    public int deleteWorkerById(Long workerId)
    {
        return workerMapper.deleteWorkerById(workerId);
    }
}
